package ec.edu.cec.java.adv.archivos;

import java.io.File;

public class RenameFile {

	public static void main(String[] args) {
		File oldName = new File("c:/test/demo1.txt");
		File newName = new File("c:/test/demostration.txt");
		boolean bool = oldName.renameTo(newName);
		if (bool) {
			System.out.println("renamed");			
		}else{
			System.out.println("Error");
		}
		

	}

}
